package com.TeacherInfoServer.pojo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;

/**
 * 
 * @TableName template_file
 */
@TableName(value ="template_file")
@Data
public class TemplateFile implements Serializable {
    /**
     * 
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 
     */
    private String templateTypeName;

    /**
     * 
     */
    private String description;

    /**
     * 
     */
    private String fileUploadName;

    /**
     * 
     */
    private String fileSaveName;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        TemplateFile other = (TemplateFile) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getTemplateTypeName() == null ? other.getTemplateTypeName() == null : this.getTemplateTypeName().equals(other.getTemplateTypeName()))
            && (this.getDescription() == null ? other.getDescription() == null : this.getDescription().equals(other.getDescription()))
            && (this.getFileUploadName() == null ? other.getFileUploadName() == null : this.getFileUploadName().equals(other.getFileUploadName()))
            && (this.getFileSaveName() == null ? other.getFileSaveName() == null : this.getFileSaveName().equals(other.getFileSaveName()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getTemplateTypeName() == null) ? 0 : getTemplateTypeName().hashCode());
        result = prime * result + ((getDescription() == null) ? 0 : getDescription().hashCode());
        result = prime * result + ((getFileUploadName() == null) ? 0 : getFileUploadName().hashCode());
        result = prime * result + ((getFileSaveName() == null) ? 0 : getFileSaveName().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", templateTypeName=").append(templateTypeName);
        sb.append(", description=").append(description);
        sb.append(", fileUploadName=").append(fileUploadName);
        sb.append(", fileSaveName=").append(fileSaveName);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}